package org.example.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
public class AddController {
    @RequestMapping("/add")
    public void add() {

    }

    @GetMapping("/list")
    public String list() {
        String string = "{\n" +
                "  \"equipmentList\": [{\n" +
                "    \"id\": 1,\n" +
                "    \"name\": \"高压断路器\",\n" +
                "    \"code\": \"EQ-2023-001\",\n" +
                "    \"model\": \"VCB-12kV\",\n" +
                "    \"manufactureDate\": \"2023-01-15\",\n" +
                "    \"batchNumber\": \"BN-202301-001\",\n" +
                "    \"manufacturer\": \"西门子\",\n" +
                "    \"status\": \"正常\"\n" +
                "  }, {\n" +
                "    \"id\": 2,\n" +
                "    \"name\": \"变压器\",\n" +
                "    \"code\": \"EQ-2023-002\",\n" +
                "    \"model\": \"S11-M-1000\",\n" +
                "    \"manufactureDate\": \"2023-02-20\",\n" +
                "    \"batchNumber\": \"BN-202302-015\",\n" +
                "    \"manufacturer\": \"ABB\",\n" +
                "    \"status\": \"维修中\"\n" +
                "  }, {\n" +
                "    \"id\": 3,\n" +
                "    \"name\": \"隔离开关\",\n" +
                "    \"code\": \"EQ-2023-003\",\n" +
                "    \"model\": \"GN30-12\",\n" +
                "    \"manufactureDate\": \"2023-03-05\",\n" +
                "    \"batchNumber\": \"BN-202303-008\",\n" +
                "    \"manufacturer\": \"施耐德\",\n" +
                "    \"status\": \"正常\"\n" +
                "  }, {\n" +
                "    \"id\": 4,\n" +
                "    \"name\": \"电流互感器\",\n" +
                "    \"code\": \"EQ-2023-004\",\n" +
                "    \"model\": \"LZZBJ9-10\",\n" +
                "    \"manufactureDate\": \"2023-04-18\",\n" +
                "    \"batchNumber\": \"BN-202304-022\",\n" +
                "    \"manufacturer\": \"正泰\",\n" +
                "    \"status\": \"故障\"\n" +
                "  }]\n" +
                "}";
        return string;

    }
}
